package abstractFactory;

public class FactoryImplByNanjing implements Factory {
    @Override
    public Fruit get(Class fruitClass) {
        System.out.println("南京工厂生产");
        try {
            Fruit fruit = (Fruit) fruitClass.newInstance();
            return fruit;
        }catch (Exception e){
            System.out.println(e.getMessage());
            return null;
        }
    }
}
